﻿@model IEnumerable<Authoring.WebRole.Models.User>

@{
    ViewBag.Title = "Index";
}

<h2>Users - Index</h2>

<p>
    @Html.ActionLink("Create New", "Create")
</p>
<table>
    <tr>
         <th></th>
       <th>
            UserName
        </th>
        <th>
            Password
        </th>
        <th>
            FirstName
        </th>
        <th>
            LastName
        </th>
        <th>
            EmailAddress
        </th>
        <th>
            Role
        </th>
        <th>
            CreatedBy
        </th>
        <th>
            CreatedOn
        </th>
        <th>
            ModifiedBy
        </th>
        <th>
            ModifiedOn
        </th>
        <th>
            IsDeleted
        </th>
    </tr>

@foreach (var item in Model) {
    <tr>
         <td>
            @Html.ActionLink("Edit", "Edit", new { id=item.ID }) |
            @Html.ActionLink("Details", "Details", new { id=item.ID }) |
            @Html.ActionLink("Delete", "Delete", new { id=item.ID })
        </td>
       <td>
            @Html.DisplayFor(modelItem => item.UserName)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Password)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.FirstName)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.LastName)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.EmailAddress)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Role.Role1)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.User2.UserName)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.CreatedOn)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.User3.UserName)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.ModifiedOn)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.IsDeleted)
        </td>
    </tr>
}

</table>
